<!doctype html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Template • TodoMVC</title>
	<link rel="stylesheet" href="./css/base.css">
	<link rel="stylesheet" href="./css/index.css">
	<!-- CSS overrides - remove if you don't need it -->
	<link rel="stylesheet" href="./css/app.css">
</head>
<body>
	<section class="todoapp" id="todoapp">
		<header class="header">
			<h1>todos</h1>
			<input class="new-todo" v-model.trim="todoName" @keyup.enter="add" placeholder="What needs to be done?" autofocus>
		</header>
		<!-- This section should be hidden by default and shown when there are todos -->
		<section class="main">
			<input id="toggle-all" class="toggle-all" type="checkbox" v-model="checkAll">
			<label for="toggle-all">Mark all as complete</label>
			<ul class="todo-list">
				<!-- These are here just to show the structure of the list items -->
				<!-- List items should get the class `editing` when editing and `completed` when marked as completed -->
				<li :class="{completed:item.done,editing:editId===item.id}" v-for="(item,index) in todoList" :key="item.id">
					<div class="view">
						<input class="toggle" type="checkbox" v-model="item.done">
						<label @dblclick="edit(item.id)">{{item.todoName}}</label>
						<button class="destroy" @click="del(item.id)"></button>
					</div>
					<input class="edit" value="Create a TodoMVC template" @blur="update" @keyup.enter="update" @keyup.esc="update"
						v-model.lazy="item.todoName">
				</li>
			</ul>
		</section>
		<!-- This footer should be hidden by default and shown when there are todos -->
		<!-- <footer class="footer" v-show="todoList.length>0"> -->
		<footer class="footer" v-show="todoList.length">
			<!-- This should be `0 items left` by default -->
			<!-- <span class="todo-count"><strong>{{todoList.filter(item=>item.done===false).length}}</strong> item left</span> -->
			<!-- <span class="todo-count"><strong>{{todoList.filter(item=>!item.done).length}}</strong> item left</span> -->
			<span class="todo-count"><strong>{{leftCount}}</strong> item left</span>
			<!-- Remove this if you don't implement routing -->
			<ul class="filters">
				<li>
					<a class="selected" href="#/">All</a>
				</li>
				<li>
					<a href="#/active">Active</a>
				</li>
				<li>
					<a href="#/completed">Completed</a>
				</li>
			</ul>
			<!-- Hidden if no completed items are left ↓ -->
			<!-- <button class="clear-completed" v-show="todoList.filter(item=>item.done===true).length>0">Clear completed</button> -->
			<!-- <button class="clear-completed" v-show="todoList.filter(item=>item.done===true).length">Clear completed</button> -->
			<!-- <button class="clear-completed" v-show="todoList.filter(item=>item.done).length">Clear completed</button> -->
			<!-- <button class="clear-completed" v-show="todoList.some(item=>item.done)">Clear completed</button> -->
			<button class="clear-completed" v-show="isShowClearCompleted" @click="clear">Clear completed</button>
		</footer>
	</section>

	<!-- Scripts here. Don't remove ↓ -->
	<script src="../../js/vue.js"></script>
	<script src="js/app.js"></script>
	<script>

	</script>
</body>
</html>